Page({
  editHouse() {
    wx.navigateTo({
      url: `/house_pkg/pages/form/index?id=${this.data.id}`,
    })
  },
  onLoad({
    id
  }) {
    // console.log({id});
    this.getDetail(id)

  },
  // 获取详情信息
  async getDetail(id) {
    const {
      code,
      data: roomDetail
    } = await wx.http.get(`/room/${id}`)
    if (code !== 10000) return wx.utils.toast()
    this.setData({
      ...roomDetail
    })
    console.log(this.data);
  }
})